// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.3.0

package CustomerRelationsManagement;

/**
 *
 * @author Administrator
 */
public final class datetime implements java.lang.Cloneable
{
    /**
     *
     */
    public byte hour;

    /**
     *
     */
    public byte minute;

    /**
     *
     */
    public byte second;

    /**
     *
     */
    public byte day;

    /**
     *
     */
    public byte month;

    /**
     *
     */
    public short year;

    /**
     *
     */
    public datetime()
    {
    }

    /**
     *
     * @param hour
     * @param minute
     * @param second
     * @param day
     * @param month
     * @param year
     */
    public datetime(byte hour, byte minute, byte second, byte day, byte month, short year)
    {
        this.hour = hour;
        this.minute = minute;
        this.second = second;
        this.day = day;
        this.month = month;
        this.year = year;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        datetime _r = null;
        try
        {
            _r = (datetime)rhs;
        }
        catch(ClassCastException ex)
        {
        }

        if(_r != null)
        {
            if(hour != _r.hour)
            {
                return false;
            }
            if(minute != _r.minute)
            {
                return false;
            }
            if(second != _r.second)
            {
                return false;
            }
            if(day != _r.day)
            {
                return false;
            }
            if(month != _r.month)
            {
                return false;
            }
            if(year != _r.year)
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 0;
        __h = 5 * __h + (int)hour;
        __h = 5 * __h + (int)minute;
        __h = 5 * __h + (int)second;
        __h = 5 * __h + (int)day;
        __h = 5 * __h + (int)month;
        __h = 5 * __h + (int)year;
        return __h;
    }

    public java.lang.Object
    clone()
    {
        java.lang.Object o = null;
        try
        {
            o = super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return o;
    }

    /**
     *
     * @param __os
     */
    public void
    __write(IceInternal.BasicStream __os)
    {
        __os.writeByte(hour);
        __os.writeByte(minute);
        __os.writeByte(second);
        __os.writeByte(day);
        __os.writeByte(month);
        __os.writeShort(year);
    }

    /**
     *
     * @param __is
     */
    public void
    __read(IceInternal.BasicStream __is)
    {
        hour = __is.readByte();
        minute = __is.readByte();
        second = __is.readByte();
        day = __is.readByte();
        month = __is.readByte();
        year = __is.readShort();
    }
}
